<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">
//오늘날짜
var nowDate = null;
//화면에 보이는 설정된 날짜
var setDate = null;

var rooms = null;
//핫 튜스 롤링
var rollCnt = 1;
var rollMaxcnt=0;
function hotRolling(){
	if(rollCnt==(rollMaxcnt-1)){
		rollCnt=0;
	}
	
	$("#hotNew > div").hide();
// 	$("#hot"+rollCnt).slideDown();
	$("#hot"+rollCnt).show();	
	rollCnt++;
}
$(document).ready(function(){
	<c:if test="${hotList !=null && fn:length(hotList)>0 }">
	rollMaxcnt = ${fn:length(hotList)};
	</c:if>
	<c:if test="${hotList !=null && fn:length(hotList)>1 }">
	setInterval( "hotRolling();", 2000);
	</c:if>
// 	setInterval( "hotRolling();", 2000);

	setDate = new Date();
	nowDate  = new Date().toString("yyyyMMdd");
	
	//객실 정보 가져오기
	var option = {
			url: "./pere101Q.do",
			data : {"p_id":'${param.p_id}'},
			success : function(json){
				rooms = json;

				changeNewDate(0);
			}
	};
	$.getJson(option);
	
});


//테이블에 쓸 객실명 가져오기
var tableRooms="";
function getTableRooms(){
	if(tableRooms==""){
		tableRooms=setTableList();
	}
	return tableRooms;
}

//예약페이지로 이동
function goReserrvation(p_id,me,pr_no){

var r_date = $(me).parent().parent().parent().parent().parent().parent().parent().attr("id").replace("day_","");
	location.href="./pere200Q.do?p_id="+p_id+"&reservation_dt="+r_date+"&pr_no="+pr_no;
}

function setMoney(key,type,initYn){
	if("Y"==initYn){
		$("#pm_dc_m_"+key).val("");
		$("#pm_per_"+key).val("");
	}
	
	if('1'==type){
		//퍼센트 할일일때
		$("#pm_dc_m_"+key).val("");
	}else if('2'==type){
		//만원단위 할일일때
		$("#pm_per_"+key).val("");
	}
	var pm_per = Number($("#pm_per_"+key).val());
	var pm_dc_m = Number($("#pm_dc_m_"+key).val())*1000;
		
	$("#pm_per_"+key).parent().find("input[name='pm_pers']").val(pm_per);
	$("#pm_per_"+key).parent().find("input[name='busy_types']").val($("input[name=busy_type_"+key+"]:checked").val());
	$("#pm_per_"+key).parent().find("input[name='pm_dc_ms']").val(pm_dc_m);
	
}

//달력에 표시할수 있도록 테이블로 만들어둠
function setTableList(){
	//아이콘 보여줄지 여부
	var p_ico_yn = rooms.list[0].p_ico_yn;
	var html="";
	html+="<br/><span class='divDel'>"+
	<c:if test="${'Y'==pensionInfo.busy1_yn }">
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0101' type='radio'   />비수기 주중</label><br/> "+
		<c:if test="${'N'!=pensionInfo.friday_yn }">
		"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0102' type='radio'  />비수기 금요일</label><br/> "+
		</c:if>
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0103' type='radio'  />비수기 토요일</label><br/> "+
	</c:if>
	<c:if test="${'Y'==pensionInfo.busy2_yn }">
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0104' type='radio'   />준수기 주중</label><br/> "+
		<c:if test="${'N'!=pensionInfo.friday_yn }">
		"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0105' type='radio'  />준수기 금요일</label><br/> "+		
		</c:if>
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0106' type='radio'  />준수기 토요일</label><br/> "+
	</c:if>
	<c:if test="${'Y'==pensionInfo.busy3_yn }">
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0107' type='radio'   />성수기 주중</label><br/> "+
		<c:if test="${'N'!=pensionInfo.friday_yn }">
		"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0108' type='radio'  />성수기 금요일</label><br/> "+		
		</c:if>
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0109' type='radio'  />성수기 토요일</label><br/> "+
	</c:if>
	"<label><input name='busy_type_@@date' onclick=\"setMoney('@@date','1','Y');\" value='0110' type='radio'   />휴무</label><br/> "+
//		"요금 : <span id='won_@@date'></span><br/>"+
	"<input id='pm_per_@@date' name='pm_per_@@date' value='' type='text' style='width:40px' onkeyup=\"setMoney('@@date','1');\" />%할인 <br/>"+
	"<input id='pm_dc_m_@@date' name='pm_dc_m_@@date' value='' type='text' style='width:40px' onkeyup=\"setMoney('@@date','2');\" /> 천원할인"+
	
	"<input name='pm_dts' value='@@date' type='hidden' style='width:40px'/>"+
	"<input name='busy_types' value='' type='hidden' style='width:40px'/>"+
	"<input name='pm_dc_ms' value='0' type='hidden' style='width:40px'/>"+
	"<input name='pm_pers' value='0' type='hidden' style='width:40px'/>"+
// 	"<input name='pm_dts' value='@@date' type='text' style='width:40px'/>"+
// 	"<input name='busy_types' value='' type='text' style='width:40px'/>"+
// 	"<input name='pm_dc_ms' value='0' type='text' style='width:40px'/>"+
// 	"<input name='pm_pers' value='0' type='text' style='width:40px'/>"+
	"</span>";
	
	return html;
}

//다음달 표시 옵션
var nextMonthYn=true;

//달력을 갱신한다
function changeNewDate(plusVal){
	$(".tt").remove();
	setDate.addMonths(plusVal);
	
	setYYYYMM();
	
	//다음달
	var nextMonth = setDate.clone().addMonths(1);

	var totalDays =setDate.getDaysInMonth();
	//다음달 표시 옵션이면
	if(nextMonthYn){
		totalDays +=nextMonth.getDaysInMonth();
	}
	
	var date1 = setDate.clone();
	date1.set({day:1});
		
	var dayName = date1.toString("ddd");
	var dateAdd = 0;


	//1일이 수요일이면 dateAdd = 3로 시작하기 위해 처리 0부터 시작
	for(var i=0; i < Date.CultureInfo.abbreviatedDayNames.length;i++){
		if(dayName == Date.CultureInfo.abbreviatedDayNames[i]){
			dateAdd=i;
			break;
		}
	}

	//다음달 숨김 처리
	var chkHideMonth = setDate.getDaysInMonth()+dateAdd;
	var weekCntNext = parseInt(chkHideMonth / 7);
	if((chkHideMonth % 7)>0){
		weekCntNext++;
	}
	//weekCnt1만 씀
	
	var totalDaysAdd= totalDays+dateAdd;
	var weekCnt = parseInt(totalDaysAdd / 7);
	if((totalDaysAdd % 7)>0){
		weekCnt++;
	}

	var html="";
	for(var i=0; i < weekCnt;i++){
		if(i>=weekCntNext){
			html+="<tr class=\"tt\" align=\"center\" style='display:none;'>";	
		}else{
			html+="<tr class=\"tt\" align=\"center\">";
		}
		
		for(var j=1; j<=7;j++){

			html+="<td class=\"day"+((i*7)+j)+"\" width=\"14%\" valign=\"top\" bgcolor=\"#FEFEF6\">&nbsp;&nbsp;&nbsp;</td>";
		}
		html+="</tr>";
	}
	$("#calTitle").after(html);
	
	
	for(var i = 1; i <= totalDays; i++ ){
		var day = date1.toString("d");
		if(i!=1 && day=="1"){
			day=date1.toString("M.d");
		}
// 		@@date

		var n_d = date1.toString("yyyyMMdd");
		var aId = $.replaceAll(getTableRooms(),"@@date",n_d);

		var htm_tb="<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">"+
		"<tr>"+
		"<td align=\"left\" valign=\"top\" height=\"100\"><b><a"+
		"href=\"/reservation/pentrip_reservation01.htm?sub=schedule&uid=caribbean&step=list&y=2012&m=02&d=13\"><font "+
		"color=\"green\">"+day+"</font></a></b>"+
		aId+
		"</td>"+
		"</tr>"+
		"</table>";
		
		var calVal = "day_"+date1.toString("yyyyMMdd");
		
		$(".day"+(i+dateAdd)).html(htm_tb);
		$(".day"+(i+dateAdd)).attr("id",calVal);
		
		
		var n_dnm = date1.toString("ddd");
// 		var dateAdd = 0;
		if("Fri"==n_dnm){
			$("input[name='busy_type_"+n_d+"']:eq(1)").attr("checked",true);
			$("input[name='busy_type_"+n_d+"']:eq(1)").parent().parent().find("input[name='busy_types']").val("0102");
		}else if("Sat"==n_dnm){
			$("input[name='busy_type_"+n_d+"']:eq(2)").attr("checked",true);
			$("input[name='busy_type_"+n_d+"']:eq(1)").parent().parent().find("input[name='busy_types']").val("0103");
		}else{
			$("input[name='busy_type_"+n_d+"']:eq(0)").attr("checked",true);
			$("input[name='busy_type_"+n_d+"']:eq(1)").parent().parent().find("input[name='busy_types']").val("0101");
		}
		date1.add(1).days();
	}
	
	var chkNowMonth = setDate.toString("yyyy")+setDate.toString("MM");
	var nowDateYYYYMM  = new Date().toString("yyyyMM");
	if(chkNowMonth==nowDateYYYYMM){
// 		오늘 이전 자료는 숨기기
		$(".tt").find("td").each(function (i){
			if($(this).attr("id")=="day_"+nowDate){
				return false;
			}
			
			$(this).find(".divDel").remove();;

		});	
	}else if(chkNowMonth>nowDateYYYYMM){//월이 오늘보다 크면 걍 두기
		
	}else{//이전이면 모두 어둡게 처리
		$("#calendar").find("td").each(function (i){
			$(this).addClass("bgGray");
		});		
	}
	
	//지난주 삭제 다음달 추가
	if(nextMonthYn){
		var chkNum = 0;
		$(".tt").each(function (){
			if($(this).find(".divDel").length == 0){
				chkNum++;
				$(this).remove();
			}
		});
		for(var i=0; i <chkNum;i++){
			var chk1=true;
			$(".tt").each(function (){
	 			if($(this).css("display")=="none"){
	 				if(chk1){
	 					$(this).show();
							chk1=false;	
	 				}
	 			}
			});
		}
	}
	
	//프로모션 설정되어 있는게 있으면 표시
	var option_400_1 = {
		url: "./pere400_1Q.do",
		data : {"p_id":'${param.p_id}',"reservation_dt":setDate.toString("yyyyMMdd")},
		success : function(json){
			//룸 갯수
			var roomCnt = rooms.list.length;

			//달력에 색칠하기
			if(json!=null && json.list.length>0){
				$.each(json.list, function (i) {
					var busy_type=this.busy_type;
					var pm_dt=this.pm_dt;
					$("input[name='busy_type_"+this.pm_dt+"']").each(function (){
						if($(this).val()==busy_type){
							$(this).attr("checked",true);
						}
					});
					
					$("#pm_per_"+this.pm_dt).val(this.pm_per);
					$("#pm_dc_m_"+this.pm_dt).val(this.pm_dc_m/1000);
					
					$("#pm_per_"+this.pm_dt).parent().parent().find("input[name='pm_pers']").val(this.pm_per);
					$("#pm_per_"+this.pm_dt).parent().parent().find("input[name='busy_types']").val(this.busy_type);
					$("#pm_per_"+this.pm_dt).parent().parent().find("input[name='pm_dc_ms']").val(this.pm_dc_m);
				});	
			}
		}
	};
	$.getJson(option_400_1);
	
	//오늘 날짜 표시 
// 	$("#day_"+nowDate).attr("bgcolor","#e3fefe");
		//예약되어있는 룸 달력에 표시
	var option__ = {
		url: "./pere200_1Q.do",
		data : {"p_id":'${param.p_id}',"reservation_dt":"${param.reservation_dt}"},
		success : function(json){
			//룸 갯수
			var roomCnt = rooms.list.length;

			//달력에 색칠하기
			if(json!=null && json.list.length>0){
				$.each(json.list, function (i) {
					
					if($("#day_"+this.reservation_dt).find(".divDel").length>0){
						if(roomCnt==this.cnt){
							//예약 다 찬거
							$("#day_"+this.reservation_dt).attr("bgcolor","#FAFC98");
						}else{
							//예약방이 남아 있는자료
							$("#day_"+this.reservation_dt).attr("bgcolor","#FEF0FE");
						}						
					}
				});	
			}
			//오늘 날짜 표시 
			$("#day_"+nowDate).attr("bgcolor","#e3fefe");
			//선택된 날짜표시
			var chkIcon = "<div id=\"event\" style=\"position:absolute; z-index:0 display:block;width: 45px;\">"+
				"	<img src=\"/usr/images/res_icon_today.gif\" width=\"15\" height=\"15\" border=\"0\">"+
				"</div>";
			$("#day_${param.reservation_dt}").prepend(chkIcon);
		}
	};
	$.getJson(option__);
	//프로모션 있는 자료설정하기
	var option__2 = {
		url: "./pere200_2Q.do",
		data : {"p_id":'${param.p_id}',"reservation_dt":"${param.reservation_dt}","pr_no":1},
		success : function(json){
			//달력에 색칠하기
			if(json!=null && json.list.length>0){
				$.each(json.list, function (i) {
					if(null!=this.rm_status  && ""!=this.rm_status){
						//예약 상태인경우
						if("R"==this.rm_status){
							$("#a_"+this.pr_no+"_"+this.reservation_dt).html("<span class='ptrstandby'>예약대기</span>");
						}else if("C"==this.rm_status){
							$("#a_"+this.pr_no+"_"+this.reservation_dt).html("<span class='ptrend'>예약완료</span>");
						}
						$("#a_"+this.pr_no+"_"+this.reservation_dt).attr("reservation_nm",this.reservation_nm);
						$("#a_"+this.pr_no+"_"+this.reservation_dt).attr("r_phone",this.r_phone1+"-"+this.r_phone2+"-"+this.r_phone3);
						$("#a_"+this.pr_no+"_"+this.reservation_dt).attr("rm_status",this.rm_status);
						
					}
// 					if(null!=this.pm_pay && ""!=this.pm_pay){
// 						//프로모션 할인 있는 경우
// 						$("#a_"+this.pr_no+"_"+this.reservation_dt).attr("pm_pay",this.pm_pay);
// 						$("#a_"+this.pr_no+"_"+this.reservation_dt).attr("busy_type",this.busy_type);
// 					}
// 					if(roomCnt==this.cnt){
// 						//예약 다 찬거
// 						$("#day_"+this.reservation_dt).attr("bgcolor","#FAFC98");
// 					}else{
// 						//예약방이 남아 있는자료
// 						$("#day_"+this.reservation_dt).attr("bgcolor","#FEF0FE");
// 					}
				});	
			}

		}
	};
	$.getJson(option__2);
	
	//지난일 그레이 처리하기
	$(".tt").find("td").each(function (i){
		if($(this).find(".divDel").length == 0){
			$(this).attr("bgcolor","#F8F6F7");
		}
	});	

// 	calTitle	타이틀
}
//메인 날짜 변경
function setYYYYMM(){
	$("#yyyyMM").html(setDate.toString("yyyy")+"년 "+setDate.toString("MM")+"월");
	$("#year").html(setDate.toString("yyyy"));
	$("#month").html(setDate.toString("MM"));
}


//툴팁 보여주기
function doTooltip(me) {

	var room_type = $(me).find("a").attr("room_type");
	var room_type_nm="커플룸";
	if(room_type=="F"){
		room_type_nm="가족룸";
	}else 	if(room_type=="B"){
		room_type_nm="단체룸";
	}
	var pay=0;
	var dayType_nm = "비수기주중";
	if($(me).find("a").attr("pm_pay")==undefined){
		var nowDate = $(me).find("a").attr("date");
		
		var nDt = new Date();
		nDt.set({year:Number(nowDate.substr(0,4)),month:Number(nowDate.substr(4,2))-1,day:Number(nowDate.substr(6,2))});
			
		var dayName = nDt.toString("ddd");
		var dateAdd = 0;


		//1일이 수요일이면 dateAdd = 3로 시작하기 위해 처리 0부터 시작
		for(var i=0; i < Date.CultureInfo.abbreviatedDayNames.length;i++){
			if(dayName == Date.CultureInfo.abbreviatedDayNames[i]){
				dateAdd=i;
				break;
			}
		}

		if(dateAdd==5){
			//금요일
			pay = Number($(me).find("a").attr("busy_1_fri"))*1000;
			dayType_nm="비수기주말";
		}else if(dateAdd==6){
			//토요일
			pay = Number($(me).find("a").attr("busy_1_sat"))*1000;
			dayType_nm="비수기주말";
		}else{
			//주중
			pay = Number($(me).find("a").attr("busy_1_base"))*1000;
		}
	}else{
		pay =Number($(me).find("a").attr("pm_pay"));
		var busy_type = $(me).find("a").attr("busy_type");

		if("0101"==busy_type){
			dayType_nm="비수기주중";
		}else if("0102"==busy_type){
			dayType_nm="비수기주말";
		}else if("0103"==busy_type){
			dayType_nm="비수기주말";
		}else if("0104"==busy_type){
			dayType_nm="준수기주중";
		}else if("0105"==busy_type){
			dayType_nm="준수기주말";
		}else if("0106"==busy_type){
			dayType_nm="준수기주말";
		}else if("0107"==busy_type){
			dayType_nm="성수기주중";
		}else if("0108"==busy_type){
			dayType_nm="성수기주말";
		}else if("0109"==busy_type){
			dayType_nm="성수기주말";
		}
// 		0101
// 		dayType_nm="";
	}
	
	var tip="";
	if($(me).find("a").attr("reservation_nm")==undefined){
		//예약이 안되어 있을때
		pay = $.comma(pay)+"원";
		tip = '<table width=\"182\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#fe89e2\">';
		tip += '    <tr>';
		tip += '      <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '          <tr>';
		tip += '            <td height=\"23\" align=\"center\" bgcolor=\"#fe89e2\" class=\"resinfot\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '                <tr align=\"center\" class=\"ptrinforoom\">';
		tip += '                  <td width=\"40%\">'+$(me).find("a").attr("room_nm")+'</td>';
		tip += '                  <td width=\"60%\">['+dayType_nm+']</td>';
		tip += '                </tr>';
		tip += '              </table></td>';
		tip += '          </tr>';
		tip += '          <tr>';
		tip += '            <td style=\"padding: 5px 7px 5px 7px;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '                <tr>';
		tip += '                  <td>'+room_type_nm+' : '+$(me).find("a").attr("room_form")+'</td>';
		tip += '                </tr>';
		tip += '                <tr>';
		tip += '                  <td height=\"18\">이용요금 : '+pay+'</td>';
		tip += '                </tr>';
		tip += '                <tr>';
		tip += '                  <td>상 태 : 예약가능</td>';
	 	tip += '               </tr>';
		tip += '              </table></td>';
		tip += '          </tr>';
		tip += '        </table></td>';
		tip += '    </tr>';
		tip += '  </table>';
	}else{
		//예약이 되어있을때
		var rm_status = $(me).find("a").attr("rm_status");
		var rm_status_nm= "<span class='ptrend'>예약완료</span>";
		if('R'==rm_status){
			rm_status_nm="<span class='ptrstandby'>예약대기</span>";
		}
		var r_nm = $.replaceAll($(me).find("a").attr("reservation_nm"),'♡','<span class="ptrblind">♡</span>');
		var r_ph = $.replaceAll($(me).find("a").attr("r_phone"),'♡','<span class="ptrblind">♡</span>');
		tip = '<table width=\"182\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"#fe89e2\">';
		tip += '    <tr>';
		tip += '      <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '          <tr>';
		tip += '            <td height=\"23\" align=\"center\" bgcolor=\"#fe89e2\" class=\"resinfot\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '                <tr align=\"center\" class=\"ptrinforoom\">';
		tip += '                  <td width=\"40%\">'+$(me).find("a").attr("room_nm")+'</td>';
		tip += '                  <td width=\"60%\">['+dayType_nm+']</td>';
		tip += '                </tr>';
		tip += '              </table></td>';
		tip += '          </tr>';
		tip += '          <tr>';
		tip += '            <td style=\"padding: 5px 7px 5px 7px;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		tip += '                <tr>';
		tip += '                  <td>예약자 : '+r_nm+'</td>';
		tip += '                </tr>';
		tip += '                <tr>';
		tip += '                  <td height=\"18\">연락처 : '+r_ph+'</td>';
		tip += '                </tr>';
		tip += '                <tr>';
		tip += '                  <td>상 태 : '+rm_status_nm+'</td>';
	 	tip += '               </tr>';
		tip += '              </table></td>';
		tip += '          </tr>';
		tip += '        </table></td>';
		tip += '    </tr>';
		tip += '  </table>';
	}

	$("#tipDiv").html(tip);
	$("#tipDiv").show();
	
	var chkWidth = tooltipLeftMargin+window.event.x;
	if((chkWidth+$("#tipDiv").width()) >$("html").width()){
		$("#tipDiv").css("left",(chkWidth - $("#tipDiv").width() -30) +"px");
	}else{
		$("#tipDiv").css("left",(chkWidth) +"px");
	}
	
	
	$("#tipDiv").css("top",(window.event.y+this.scrollY) +"px");


}
var tooltipLeftMargin=20;
var tooltipTopMargin=0;
//툴팁 이동
function moveTip(me){
	var chkWidth = tooltipLeftMargin+window.event.x;
	if((chkWidth+$("#tipDiv").width()) >$("html").width()){
		$("#tipDiv").css("left",(chkWidth - $("#tipDiv").width() -30) +"px");
	}else{
		$("#tipDiv").css("left",(chkWidth) +"px");
	}
	$("#tipDiv").css("top",(window.event.y+this.scrollY) +"px");
}
//툴팁 숨기기
function hideTip(){
	$("#tipDiv").hide();
}

//프로모션 저장
function saveData(){
	if(confirm("저장하시겠습니까?")){
		$("#frmData").submit();	
	}
	
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
		        <tr>
          <td background="/usr/images/mypage_m01bg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="40%"><img src="/usr/images/res_m01.gif" width="262" height="22"></td>
                <td width="60%" align="right">
					<%@ include file="/WEB-INF/jsp/usr/pe/re/pere_top.jsp"%>
                </td>
              </tr>
            </table></td>
        </tr>
		        <tr>
          <td height="20" background="/usr/images/res_mbg.gif" bgcolor="#F4F4F4">&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="60%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="55"><img src="/usr/images/res_char.gif" width="47" height="57"></td>
                <td>
<c:if test="${brdList !=null && fn:length(brdList)>0 }">
	<c:forEach var="map1" items="${brdList}" varStatus="status">
					<table border="0" cellspacing="0" cellpadding="1">
						<tr>
							<td width="15" class="reds">▶</td>
							<td class="dgrayb">${map1.sb_content }</td>
						</tr>
					</table>
	</c:forEach>
</c:if>
               </td>
              </tr>
            </table></td>
          <td width="40%" align="right" style="padding-right: 30px;"><table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="70" align="left"><img src="/usr/images/reservation_icon_home.gif" width="47" height="31"></td>
              <td><img src="${pensionInfo.p_logo }" border="0" height="30"></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td style="padding-bottom: 10px; padding-top: 10px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="56"><img src="/usr/images/res_icon_hot.gif" width="56" height="16"></td>
                <td class="dgrayb" style="padding-top: 2px; padding-left: 10px;">
<!--                 	<iframe src="reservation_newsstick.php?uid=caribbean" scrolling="no" frameborder="0" width="380" height="20"></iframe> -->
<c:if test="${hotList !=null && fn:length(hotList)>0 }">
		<div id="hotNew">
	<c:forEach var="map1" items="${hotList}" varStatus="status">
			<div id="hot${fn:length(hotList)-status.index-1 }" <c:if test="${status.index!=(fn:length(hotList)-1) }"> style="display: none"</c:if>>${map1.sb_content }</div>
	</c:forEach>
		</div>
</c:if>
                </td>
              </tr>
            </table></td>
          <td align="right" style="padding-bottom: 10px; padding-top: 10px;"><table width="85%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="53"><A href="#" onclick="changeNewDate(-1);" ><img src="/usr/images/res_lastm.gif" width="53" height="13"></A></td>
                <td align="center" class="oranb2" id="yyyyMM"></td>
                <td width="53" align="right"><A href="#" onclick="changeNewDate(1);" ><img src="/usr/images/res_nextm.gif" width="53" height="13"></A></td>
              </tr>
            </table></td>
        </tr>
      </table>

	<div id='tipDiv' style='position:absolute; z-index:100'></div>

<!-- 달력 시작 -->
<form action="./pere400T.do" id="frmData" method="post">

<input name="p_id" value="${param.p_id }" type="hidden"/>

<table width=100% border="0" cellspacing="0" cellpadding="5">
	<tr>
		<td bgcolor="#edecec"><table cellspacing=1 cellpadding=0
				width='100%'>
				<tr>
					<td height=55 colspan=7 bgcolor="#FFFFFF"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td width="20">&nbsp;</td>
								<td class="month" id="month">02</td>
								<td width="30" valign="top" class="year"
									style="padding-left: 5px; padding-top: 12px;" id="year">2012</td>
							</tr>
						</table>
				</tr>
				<tr align="center" id="calTitle">
					<td width='14%' height='35' bgcolor=#FC636A><img
						src="/usr/images/res_w_sun.gif" width="36" height="15"></td>
					<td width='14%' bgcolor=#fdfdfd><img
						src="/usr/images/res_w_mon.gif" width="40" height="15"></td>
					<td width='14%' bgcolor=#fdfdfd><img
						src="/usr/images/res_w_tue.gif" width="34" height="14"></td>
					<td width='14%' bgcolor=#fdfdfd><img
						src="/usr/images/res_w_wed.gif" width="40" height="14"></td>
					<td width='14%' bgcolor=#fdfdfd><img
						src="/usr/images/res_w_thur.gif" width="35" height="14"></td>
					<td width='14%' bgcolor=#86AD29><img
						src="/usr/images/res_w_fri.gif" width="26" height="14"></td>
					<td width='14%' bgcolor=#4DA6FA><img
						src="/usr/images/res_w_sat.gif" width="34" height="15"></td>
				</tr>
			</table>
	</tr>
</table>

<a href="#" onclick="saveData();">
<img src="/pmgr/images/btn_save.jpg"/>
</a>

</form>
<!-- 	달력 종료 -->
	
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td style="padding-bottom: 7px; padding-top: 7px;">※ 예약되지 않은 객실에 마우스를 올리면 <span class="bold">당일요금</span> 이 표시 됩니다<br>
            ※ 예약된 객실에 마우스를 올리면 <span class="bold">예약자</span>와 <span class="bold">전화번호</span> 뒷자리가 표시됩니다</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="3" bgcolor="#86ad29"></td>
        </tr>
        <tr>
          <td style="padding-top: 2px;"><%@ include file="/WEB-INF/jsp/usr/pe/re/footer.jsp"%></td>
        </tr>
      </table></td>
  </tr>
</table>